button: Stop fiddling with PRELIGHT state
authorTimm Bäder <mail@baedert.org>
Tue, 1 Aug 2017 16:16:40 +0000 (18:16 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 1 Aug 2017 16:16:40 +0000 (18:16 +0200)
This is done automatically now and it's wrong here since it gets
executed after gesture release.

gtk/gtkbutton.c

index ad6c3df3de564a8c7b1388e4e21a1a4209a7e4a6..592fa10644bf67be050faf997398a64536e4e07a 100644 (file)
@@ -1058,11 +1058,7 @@ gtk_button_update_state (GtkButton *button)
   else
     depressed = priv->in_button && priv->button_down;
 
-  new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
-    ~(GTK_STATE_FLAG_PRELIGHT | GTK_STATE_FLAG_ACTIVE);
-
-  if (priv->in_button)
-    new_state |= GTK_STATE_FLAG_PRELIGHT;
+  new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) & ~(GTK_STATE_FLAG_ACTIVE);
 
   if (depressed)
     new_state |= GTK_STATE_FLAG_ACTIVE;